#import "AboutUI.h"
#import <QuartzCore/QuartzCore.h>
#import "Tools.h"
@interface AboutUI ()

@end

@implementation AboutUI

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    
    
   
    self.tableView.contentInset=UIEdgeInsetsMake(0, 0, 560, 0);
    self.tableView.separatorStyle=NO;
    
    float iosVersion=[Tools getIOSVersion];
    if (iosVersion<7) {
        UIImageView* iconView=[[UIImageView alloc] initWithFrame:CGRectMake(120, 20, 80, 80)];
        iconView.image=[UIImage imageNamed:@"yedian120"];
        iconView.layer.masksToBounds = YES; //没这句话它圆不起来
        iconView.layer.cornerRadius =12; //设置图片圆角的尺度
        [self.view addSubview:iconView];
    }else{
        UIImageView* iconView=[[UIImageView alloc] initWithFrame:CGRectMake(120, 60, 80, 80)];
        iconView.image=[UIImage imageNamed:@"yedian120"];
        iconView.layer.masksToBounds = YES; //没这句话它圆不起来
        iconView.layer.cornerRadius =12; //设置图片圆角的尺度
        [self.view addSubview:iconView];
    }
    
    
    
    
    UILabel*  titleLb=[[UILabel alloc] initWithFrame:CGRectMake(120, 0, 80, 44)];
    titleLb.textColor=[UIColor whiteColor];
    titleLb.text=@"关于我们";
    titleLb.textAlignment=NSTextAlignmentCenter;
    titleLb.font=[UIFont boldSystemFontOfSize:16];
    titleLb.backgroundColor=[UIColor clearColor];
    self.navigationItem.titleView=titleLb;
    
    
    CGRect frame_img= CGRectMake(0, 1, 25/2, 41/2);
    UIImageView* backView=[[UIImageView alloc] initWithFrame:frame_img];
    backView.image=[UIImage imageNamed:@"返回"];
    
    CGRect frameBtn= CGRectMake(0, 0,50, 41/2);
    UIButton* homeBtn= [[UIButton alloc] initWithFrame:frameBtn];
    
    [homeBtn addTarget:self action:@selector(clickOnBackBut) forControlEvents:UIControlEventTouchUpInside];
    
    [homeBtn addSubview:backView];
    UILabel* backLb=[[UILabel alloc] initWithFrame:CGRectMake(14, 1, 28, 20)];
    backLb.text=@"返回";
    backLb.font=[UIFont boldSystemFontOfSize:14];
    backLb.textColor=[UIColor whiteColor];
    backLb.backgroundColor=[UIColor clearColor];
    [homeBtn addSubview:backLb];
    
    
    UIBarButtonItem* barHomeBtn= [[UIBarButtonItem alloc] initWithCustomView:homeBtn];
    
    self.navigationItem.leftBarButtonItem = barHomeBtn;
    
    UIImage* line=[UIImage imageNamed:@"线.png"];
    int y=150;
    if (iosVersion<7) {
        y=120;
    }
    UILabel* descImgView=[[UILabel alloc] initWithFrame:CGRectMake((320-353/2)/2, y, SCREEN_WIDTH, 112/2)];
    descImgView.text=@"～约会聊天派对的利器～";
    [self.view addSubview:descImgView];
    
    
    UIImageView*  line0View=[[UIImageView alloc] initWithFrame:CGRectMake(0,y+112/2+40-8, 320, 1)];
    line0View.image=line;
    [self.view addSubview:line0View];
    
    
    UILabel*  linkmanLb=[[UILabel alloc] initWithFrame:CGRectMake(30, y+112/2+40, 260, 40)];
    linkmanLb.text=@"联系人 :夜猫客服中心";
    linkmanLb.font=[UIFont boldSystemFontOfSize:16];
    linkmanLb.backgroundColor=[UIColor clearColor];
    [self.view addSubview:linkmanLb];
    
    UILabel* dot=[[UILabel alloc] initWithFrame:CGRectMake(30,y+112/2+50+30, 260, 3)];
    dot.text=@"-----------------------------------";
    dot.textColor=[UIColor lightGrayColor];
    [self.view addSubview:dot];
    //
    UILabel*  emailLb=[[UILabel alloc] initWithFrame:CGRectMake(30, y+112/2+50+30, 260, 50)];
    emailLb.text=@"Email : 11111111@qq.com";
    emailLb.font=[UIFont boldSystemFontOfSize:16];
    emailLb.backgroundColor=[UIColor clearColor];
    [self.view addSubview:emailLb];
    
    dot=[[UILabel alloc] initWithFrame:CGRectMake(30,y+112/2+50+30+50, 260, 3)];
    dot.text=@"------------------------------------";
    dot.textColor=[UIColor lightGrayColor];
    [self.view addSubview:dot];
    //
    UILabel*  hotlineLb=[[UILabel alloc] initWithFrame:CGRectMake(30, y+112/2+50*2+30, 260, 50)];
    hotlineLb.text=@"客服热线 : 13000000000";
    hotlineLb.font=[UIFont boldSystemFontOfSize:16];
    hotlineLb.backgroundColor=[UIColor clearColor];
    hotlineLb.textColor=[UIColor redColor];
    [self.view addSubview:hotlineLb];
    
    dot=[[UILabel alloc] initWithFrame:CGRectMake(30,y+112/2+50+30+50*2, 260, 3)];
    dot.text=@"------------------------------------";
    dot.textColor=[UIColor lightGrayColor];
    [self.view addSubview:dot];
    //
    UILabel*  qqLb=[[UILabel alloc] initWithFrame:CGRectMake(30, y+112/2+50*3+30, 260, 50)];
    qqLb.text=@"QQ : 11111111";
    qqLb.font=[UIFont boldSystemFontOfSize:16];
    qqLb.backgroundColor=[UIColor clearColor];
    qqLb.textColor=[UIColor blackColor];
    [self.view addSubview:qqLb];
    
    
    /////
    
    
    
    
    UIImageView*  line8View=[[UIImageView alloc] initWithFrame:CGRectMake(0,y+112/2+50+30+50*3, 320, 1)];
    line8View.image=line;
    [self.view addSubview:line8View];
    
}
-(void)clickOnBackBut{
    [self.navigationController popViewControllerAnimated:NO];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
 {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
